import URL from '@/config/url'
import utils from '@/utils/utils'

export default{
	// 获取施工队主页数据
	getIndexInfo(params={}){
		let data = {
			team_id:params.team_id
		}
		return utils.uniRequest({url:URL.BASE2 + '/builder/BuildTeam/index',data})
	},
	
	// 获取施工队详情
	getUserInfo(params={}){
		let data = {
			team_id:params.team_id
		}
		return utils.uniRequest({url:URL.BASE2 + '/builder/BuildTeam/getDetail',data})
	},
	
	
	// 获取工地资料负责人信息
	getBuilderInfo(params={}){
		let data = {
			order_id:params.order_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuildDirector/getList',data})
	},
	
	
	// 获取施工订单列表
	getStaffOrder(params={}){
		let data = {
			// team_id:params.team_id,
			status:params.status,
			keyword:params.keyword,
			page:params.page,
			pagesize:params.pagesize
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuilderTeamOrder/getList',data})
	},
	
	
	// 获取订单详情
	getDetail(params={}){
		let data = {
			order_id:params.order_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuilderTeamOrder/getDetail',data})
	},
	
	
	// 关闭订单
	cancelOrder(params={}){
		let data = {
			order_id:params.order_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuilderTeamOrder/cancel',data})
	},
	
	// 删除订单
	delOrder(params={}){
		let data = {
			order_id:params.order_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuilderTeamOrder/del',data})
	},
	
	// 获取施工播报列表
	getBroadList(params={}){
		let data = {
			order_id:params.order_id,
			page:params.page,
			pagesize:params.pagesize,
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuildBroadcast/getList',data})
	},
	
	
	// 获取档案目录列表
	getCateLog(params={}){
		let data = {
			order_id:params.order_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/ArchiveCategory/getList',data})
	},
	
	// 获取档案列表
	getRetaList(params={}){
		let data = {
			category_id:params.category_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuildArchive/getList',data})
	},
	
	// 获取档案详情
	getRetaDetail(params={}){
		let data = {
			archive_id:params.archive_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuildArchive/getDetail',data})
	},
	
	
	// 获取施工进度列表
	getProgressList(params={}){
		let data = {
			order_id:params.order_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuildProgress/getList',data})
	},
	
	// 更改施工队进度
	changeProgress(params={}){
		let data = {
			progress_id:params.progress_id,
			status:params.status
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuildProgress/changeStatus',data})
	},
	
	// 回退
	toBackOrder(params={}){
		let data = {
			order_id:params.order_id,
			is_back:params.is_back
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuilderTeamOrder/back',data})
	},
	
	// 确认完工
	confirmOrder(params = {}){
		let data = {
			order_id:params.order_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuilderTeamOrder/complete',data})
	},
	
	// 获取申述单列表
	getAppealList(params = {}){
		let data = {
			page:params.page,
			pagesize:params.pagesize
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuilderTeamOrder/getAppealList',data})
	},
	
	// 获取申述单详情
	getAppealDetail(params = {}){
		let data = {
			appeal_id:params.appeal_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuilderTeamOrder/getAppealDetail',data})
	},
	
	// 平台介入
	toIntervene(params = {}){
		let data = {
			appeal_id:params.appeal_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuilderTeamOrder/platformInterpose',data})
	},
	
	// 撤回申述
	toWithdraw(params = {}){
		let data = {
			appeal_id:params.appeal_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuilderTeamOrder/recallAppeal',data})
	},
	
	// 解决申述
	toResolve(params = {}){
		let data = {
			appeal_id:params.appeal_id
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuilderTeamOrder/resolveAppeal',data})
	}
	
	
}